#include "lcd_app.h"
#include "stdio.h"

uint8_t lcd_mode;
uint16_t para[2]={1000,2000};
uint16_t recd[2]={2000,1000};
void Lcd_Sprinrf(uint8_t line,char *format,...)	
{
 char string[21];
	va_list arg;
	va_start(arg,format);
	vsprintf(string, format, arg);
	va_end(arg);
	LCD_DisplayStringLine(line,(u8 *)string);


}

void lcd_proc(void)
{
	Lcd_Sprinrf(Line5," %d:   ",lcd_mode);
	switch(lcd_mode)
	{
		case 0:
				Lcd_Sprinrf(Line0,"        DATA:   ");
				Lcd_Sprinrf(Line1,"    ADC1:%d    " ,adc_value[0]);
				Lcd_Sprinrf(Line2,"    ADC2:%d     ",adc_value[1]);
			break;
		case 1:
				Lcd_Sprinrf(Line0,"        PARA:   " );
				Lcd_Sprinrf(Line1,"    PD:%d    ",para[0]);
				Lcd_Sprinrf(Line2,"    PH:%d    ",para[1]);
			break;
		case 2:
				Lcd_Sprinrf(Line0,"        RECD:   " );
				Lcd_Sprinrf(Line1,"    PD:%d    ",recd[0]);
				Lcd_Sprinrf(Line2,"    PH:%d    ",recd[1]);
			break;	
		
	
	}



}
	
